package com.lixw.langchain.controller;

import com.lixw.langchain.service.ChatAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: HighApiController
 * @Description:
 * @Author: xuweiLi
 * @Create: 2025/8/22 20:30
 **/
@RestController
@Slf4j
public class HighApiController {
    @Resource
    private ChatAssistant chatAssistant;

    @GetMapping("/highapi")
    public String highApi(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt) {
        return chatAssistant.call(prompt);
    }
}